/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Verito Ramirez
 *         Victor Jaramillo
 */
@Entity
@Table(name = "cxp_tiponota")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CxpTipoNota.findAll", query = "SELECT s FROM CxpTipoNota s"),
    @NamedQuery(name = "CxpTipoNota.findBycxpCodigoTipNot", query = "SELECT s FROM CxpTipoNota s WHERE s.cxpCodigoTipNot = :cxpCodigoTipNot"),
    @NamedQuery(name = "CxpTipoNota.findBycxpNombreTipNot", query = "SELECT s FROM CxpTipoNota s WHERE s.cxpNombreTipNot = :cxpNombreTipNot")})
public class CxpTipoNota implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "CXP_CODIGO_TIPNOT")
    private String cxpCodigoTipNot;
    @Size(max = 45)
    @Column(name = "CXP_NOMBRE_TIPNOT")
    private String cxpNombreTipNot;
    
    
    public CxpTipoNota() {
    }
    
    public CxpTipoNota(String cxpCodigoTipNot) {
        this.cxpCodigoTipNot = cxpCodigoTipNot;
    }

    public CxpTipoNota(String cxpCodigoTipNot, String cxpNombreTipNot) {
        this.cxpCodigoTipNot = cxpCodigoTipNot;
        this.cxpNombreTipNot = cxpNombreTipNot;
    }

    public String getCxpCodigoTipNot() {
        return cxpCodigoTipNot;
    }

    public void setCxpCodigoTipNot(String cxpCodigoTipNot) {
        this.cxpCodigoTipNot = cxpCodigoTipNot;
    }

    public String getCxpNombreTipNot() {
        return cxpNombreTipNot;
    }

    public void setCxpNombreTipNot(String cxpNombreTipNot) {
        this.cxpNombreTipNot = cxpNombreTipNot;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cxpCodigoTipNot != null ? cxpCodigoTipNot.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CxpTipoNota)) {
            return false;
        }
        CxpTipoNota other = (CxpTipoNota) object;
        if ((this.cxpCodigoTipNot == null && other.cxpCodigoTipNot != null) || (this.cxpCodigoTipNot != null && !this.cxpCodigoTipNot.equals(other.cxpCodigoTipNot))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.CxpTipoNota[ cxpCodigoTipNot=" + cxpCodigoTipNot + " ]";
    }
    
}
